#define _CRT_SECURE_NO_WARNINGS 1
#include"list.h"

void Testlist1()
{
	LTNode* plist = LTInit();
	LTPushBack(plist, 1);
	LTPushBack(plist, 2);
	LTPushBack(plist, 3);
	LTPushBack(plist, 4);

	LTPrint(plist);
	LTDestroy(plist);
}

void Testlist2()
{
	LTNode* plist = LTInit();
	LTPushFront(plist, 1);
	LTPushFront(plist, 2);
	LTPushFront(plist, 3);
	LTPushFront(plist, 4);

	LTPrint(plist);

	LTPopBack(plist);
	LTPrint(plist);

	LTPopFront(plist);
	LTPrint(plist);

	LTDestroy(plist);

}
void Testlist3()
{
	LTNode* plist = LTInit();
	LTPushFront(plist, 1);
	LTPushFront(plist, 2);
	LTPushFront(plist, 3);
	LTPushFront(plist, 4);

	LTPrint(plist);


	LTNode* pos = LTFind(plist, 3);
	/*if (pos)
	{
		LTInsert(pos, 20);
	}
	LTPrint(plist);*/

	if (pos)
	{
		LTErase(pos);
	}
	LTPrint(plist);

	LTDestroy(plist);
}
int main()
{
	Testlist3();
	return 0;
}